#include <iostream>

using namespace std;

int main(void)
{
    //一维数组

    /*
        数据类型 数组名[数组长度]；
        数据类型 数组名[数组长度] = {值1，值2，……}；
        数据类型 数组名[] = {值1，值2，……}；
    */

    int arr[5];
    arr[0] = 10;
    arr[1] = 20;
    arr[2] = 30;
    arr[3] = 40;
    arr[4] = 50;

    cout << arr[0] << endl;
    cout << arr[1] << endl;
    cout << arr[2] << endl;
    cout << arr[3] << endl;
    cout << arr[4] << endl;

    int arr1[5] = {10, 20, 30, 40, 50};
    cout << arr1[0] << endl;
    cout << arr1[1] << endl;
    cout << arr1[2] << endl;
    cout << arr1[3] << endl;
    cout << arr1[4] << endl;

    int arr2[] = {10, 20, 30, 40, 50};
    int i;
    for (i = 0; i < 5; i++)
    {
        cout << arr2[i] << endl;
    }

    return 0;
}